<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <title>GiPS web client</title>
    <meta name="title" content="GiPS webloc" />
    <meta name="description" content="Site description here" />
    <meta name="keywords" content="gps, direct marketing, mappe, android, html5" />
    <meta name="subject" content="Visualizzazione campagne sul territorio" />
    <meta name="robots" content="All" />
    <meta name="copyright" content="INTEGRA srl" />
    <meta name="abstract" content="Visualizzazione campagne sul territorio" />
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <link id="theme" rel="stylesheet" type="text/css" href="style.css" title="theme" />
    <script src="http://code.google.com/apis/gears/gears_init.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/geo.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" language="javascript" src="js/addon.js"></script>
    <script type="text/javascript" language="javascript" src="js/custom.js"></script>
   
        <script>
                var isLogging=0;
                var intervalFunc;
                var waitForData=0;
                var xmlhttp;

                function success_callback(p)
                {
                    if (waitForData!=4611)
                    {
                        waitForData=0;
                        document.getElementById('lat').innerHTML=p.coords.latitude;
                        document.getElementById('lng').innerHTML=p.coords.longitude;
                        document.getElementById('status').innerHTML="Invio...";
                        //xmlhttp.onreadystatechange=function()
                        //{
                        //    if (xmlhttp.readyState==4 && xmlhttp.status==200)
                        //    {
                        //        document.getElementById("status").innerHTML="sent";
                        //    }
                        //};
                        xmlhttp.open("GET","logPos.php?key="+document.log.key.value+"&tag="+document.log.tag.value+"&latitude="+p.coords.latitude+"&longitude="+p.coords.longitude,true);
                        xmlhttp.send();
                    }
                } 
                
                function error_callback(p)
                {
                        alert('error='+p.message);
                }               

                function logPosition()
                {
                    waitForData=1;
                    geo_position_js.getCurrentPosition(success_callback,error_callback,{enableHighAccuracy:true});
                    waitForData=0;
                }

                function logControl(cont)
                {
                    if(!geo_position_js.init())
                    {
                         alert("Localizzazione non disponibile.");
                    }

                    if (window.XMLHttpRequest)
                    {  // code for IE7+, Firefox, Chrome, Opera, Safari
                        xmlhttp=new XMLHttpRequest();
                    }
                    else
                    {// code for IE6, IE5
                        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                    }

                    if (isLogging && cont)
                    {
                        clearInterval(intervalFunc); 
                        isLogging=0;
                        document.getElementById('logText').innerHTML="Inizia tracking";
                    }
                    else
                    {
                        logPosition();
                        if (cont)
                        {
                            i = document.log.interval.value * 1000;
                            if (i < 5000)
                            {
                                i=5000;
                            }
                            intervalFunc = setInterval(logPosition,i);
                            isLogging=1;
                            document.getElementById('logText').innerHTML="Termina tracking";
                        }
                    }
                }

                function submitKeyPage()
                {
                    document.forms.log.action = "keyInfo.php?key="+document.log.key.value+"&tag="+document.log.tag.value;
                    ducument.forms.log.submit();
                }

        </script>
  </head>
  <body> 
    <!-- top wrapper -->  
    <div id="topWrapper"> 
      <div id="topBanner"></div> 
    </div>  
    
    <!-- end top wrapper -->  
    <div id="wrapper"> 
      <div id="container"> 
        <div id="banner" class="slideshowContainer"> 
          <!-- put your slideshow images here -->  
          <div class="slideshow" style="text-align:center"> 
            <form action="keyInfo.php" method="GET">

            <br/>
            <div id="header">
	     <img src="images/satellite128.png" alt="GiPS web client" style="width:100px;height:100px"/>
            </div>
            <div id="body">Latitudine: <span style="color:red" id="lat">0.0</span> - Longitudine: <span style="color:red" id="lng">0.0</span> <br/><span id="status" style="color:darkred">In attesa del segnale...</span>
            <br/>
            <form name="log" method="GET" action="showPos.php">
            <div class="half" style="text-align:right">
              Codice campagna &nbsp<input name="key" /><br/>
              <p>Identificativo operatore &nbsp<input name="tag" /></p>
              <p>Intervallo aggiornamenti (sec.) &nbsp<input name="interval" value="20"/>
            </div>  
            <div class="half last" style="text-align:left"> 
              <button id="logText" type="button" onclick="logControl(1)">Inizia tracking</button>
              <p><button type="button" onclick="logControl(0)">Invia punto</button></p>
              <p><input type="submit" name="Show" value="Visualizza dati" style="background: #A9A9A9;"/></p>
              <!-- <input type="button" onclick="submitKeyPage();" value="Visualizza campagna">-->
              
            </div> 
        </form>
        </div>



            </a> 
          </div>  
          <div class="slideshowLeftCorner"></div>  
          <div class="slideshowRightCorner"></div>  
          <div class="slideshowBottom"></div> 
        </div>  
        <!--  content -->  
        <div id="content"> 
          <div style="margin-top:20px;"> 
            <div class="one_fourth"> 
              <div class="bloc rounded"> 
                <h3>HOME</h3>  
                <p> 
                  <img src="images/starthere48.png" style="float:right;margin:0 0 0 8px" /> <a href="index.html">Home</a> ipsum dolor sit amet, turpis egestas commodo, eget non ultrices nec lectus, ac interdum, netus aliquam.
                </p> 
              </div> 
            </div>  
            <div class="one_fourth"> 
              <div class="bloc rounded"> 
                <h3>ANDROID</h3>  
                <p> 
                  <img src="images/android2.png" style="float:right;margin:0 0 0 8px" /> Lorem ipsum dolor sit amet, turpis egestas commodo, eget non ultrices nec lectus, ac interdum, netus aliquam.
                </p> 
              </div> 
            </div>  
            <div class="one_fourth"> 
              <div class="bloc rounded"> 
                <h3>FAQ</h3>  
                <p> 
                  <img src="images/faqs.png" style="float:right;margin:0 0 0 8px" /> Lorem ipsum dolor sit amet, turpis egestas commodo, eget non ultrices nec lectus, ac interdum, netus aliquam.
                </p> 
              </div> 
            </div>  
            <div class="one_fourth last"> 
              <div class="bloc rounded"> 
                <h3>DISCLAIMER</h3>  
                <p> 
                  <img src="images/warning.png" style="float:right;margin:0 0 0 8px" /> Lorem ipsum dolor sit amet, turpis egestas commodo, eget non ultrices nec lectus, ac interdum, netus aliquam.
                </p> 
              </div> 
            </div>  
            <div class="clear"></div>  
            <div> 
              <!--<h1>Titolo uno</h1>  
              <p>Lorem ipsum dolor sit amet, turpis egestas commodo, eget non ultrices nec lectus, ac interdum, netus aliquam, vulputate vel reiciendis risus. Lorem ipsum dolor sit amet, turpis egestas commodo, eget non ultrices nec lectus, ac interdum, netus aliquam, vulputate vel reiciendis risus.
              </p> 
            </div>-->  
            <div class="half"> 
              <h3>Titolo due</h3>  
              <p>Lorem ipsum dolor sit amet, turpis egestas commodo, eget non ultrices nec lectus, ac interdum, netus aliquam, vulputate vel reiciendis risus.</p> 
            </div>  
            <div class="half last"> 
              <h3>Titolo tre</h3>  
              <p>Lorem ipsum dolor sit amet, turpis egestas commodo, eget non ultrices nec lectus, ac interdum, netus aliquam.</p> 
            </div> 
          </div>  
          <div class="clear"></div> 
        </div>  
        <!-- end content -->  
        <div class="clear" style="height:40px"></div> 
      </div>  
      <!-- end container --> 
    </div>  

    <div id="bottomWrapper"> 
      <!--<div id="footer"> 
        <div class="footer-one-third"> 
          <h2>Azienda</h2>  
          <ul>
            <li>
              <a href="#" shape="rect">Chi siamo</a>
            </li>
            <li>
              <a href="#" shape="rect">Cosa facciamo</a>
            </li>
            <li>
              <a href="#" shape="rect">Contatti</a>
            </li>
            <li>
              <a href="#" shape="rect">Partner</a>
            </li>
            <li>
              <a href="#" shape="rect">Links</a>
            </li>
          </ul> 
        </div>  
        <div class="footer-one-third"> 
          <h2>Prodotti</h2>  
          <ul>
            <li>
              <a href="#" shape="rect">Prodotti</a>
            </li>
            <li>
              <a href="#" shape="rect">Servizi</a>
            </li>
            <li>
              <a href="#" shape="rect">Clienti</a>
            </li>
            <li>
              <a href="#" shape="rect">Abstract</a>
            </li>
            <li>
              <a href="#" shape="rect">Links</a>
            </li>
          </ul> 
        </div>  
        <div class="footer-one-third footer-last"> 
          <h2>Archivi</h2>  
          <ul>
            <li>
              <a href="#" shape="rect">Lorem ipsum</a>
            </li>
            <li>
              <a href="#" shape="rect">Dolor sit</a>
            </li>
            <li>
              <a href="#" shape="rect">Turpis egestas</a>
            </li>
            <li>
              <a href="#" shape="rect">Commodo</a>
            </li>
            <li>
              <a href="#" shape="rect">Eget non</a>
            </li>
          </ul> 
        </div> 
      </div>  -->
      <div id="bottom-links">
<br/>
        &copy;2010
          <a href="http://www.integraitalia.com">INTEGRA SRL</a> - <a href="/credits.html">CREDITS</a>
        </div> 
      </div> 
    </div> 
  </body>
</html>
